home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / progjour / 1991 / 04 / v_restor.c < prev    next >
C/C++ Source or Header  |  1991-05-03  |  547b  |  25 lines

  1. /*    v_restor.c- Workhorse Function: Restore Screen Region */
  2.  
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <conio.h>
  6. #include <tools/viewport.h>
  7.  
  8. void _v_restore_scr( iptr image, int row, int col, int nrows, int ncols )
  9. {
  10.     /* Like save_scr, but goes in the other direction */
  11.  
  12.     int i;
  13.     int buf[ VMAXCOLS ], *bp;
  14.  
  15.     while( --nrows >= 0 )
  16.     {
  17.         bp = buf;
  18.         for( i = ncols ; --i >= 0 ; )
  19.             *bp++ = *image++ ;
  20.  
  21.         puttext( col+1, row+1, col+ncols, row+1, buf );
  22.         ++row;
  23.     }
  24. }
  25.